// +---------------------------------------------------------------------
// | 加梯 [ LIFT赋能开发者，助力企业发展 ]
// +---------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.lift.com All rights reserved.
// +---------------------------------------------------------------------
// | Licensed LIFT并不是自由软件，未经许可不能去掉LIFT相关版权
// +---------------------------------------------------------------------
// | Author: 加梯 Team <admin@lift.com>
// +---------------------------------------------------------------------

import BasicLayout from '@/components/main';

const meta = {
  auth: true,
};

const pre = 'basic_';

export default {
  path: '/admin/basic',
  name: 'basic',
  header: 'basic',
  redirect: {
    name: `${pre}list`,
  },
  meta,
  component: BasicLayout,
  children: [
    {
      path: 'information/community',
      name: `${pre}Community`,
      meta: {
        auth: ['admin-basic-information-community'],
        title: '社区管理',
      },
      component: () => import('@/pages/basicInformation/community/index')
    },
    {
      path: 'information/add_community/:id?',
      name: `${pre}AddCommunity`,
      meta: {
        auth: ['admin-basic-information-add-community'],
        title: '新建社区',
      },
      component: () => import('@/pages/basicInformation/community/add/index')
    },
    {
      path: 'information/building',
      name: `${pre}Building`,
      meta: {
        auth: ['admin-basic-information-building'],
        title: '楼宇管理',
      },
      component: () => import('@/pages/basicInformation/building/index')
    },
    {
      path: 'information/add_building/:id?',
      name: `${pre}AddBuilding`,
      meta: {
        auth: ['admin-basic-information-add-building'],
        title: '新建楼宇',
      },
      component: () => import('@/pages/basicInformation/building/add/index')
    },
    {
      path: 'information/unit',
      name: `${pre}Unit`,
      meta: {
        auth: ['admin-basic-information-unit'],
        title: '单元管理',
      },
      component: () => import('@/pages/basicInformation/unit/index')
    },
    {
      path: 'information/add_unit/:id?',
      name: `${pre}AddUnit`,
      meta: {
        auth: ['admin-basic-information-add-unit'],
        title: '新建单元',
      },
      component: () => import('@/pages/basicInformation/unit/add/index')
    },
    {
      path: 'information/enterprise',
      name: `${pre}Enterprise`,
      meta: {
        auth: ['admin-basic-information-enterprise'],
        title: '勘探公司管理',
      },
      component: () => import('@/pages/basicInformation/exploration-enterprise-manager/index')
    },
    {
      path: 'information/add_enterprise/:id?',
      name: `${pre}AddEnterprise`,
      meta: {
        auth: ['admin-basic-information-add-enterprise'],
        title: '新建勘探公司',
      },
      component: () => import('@/pages/basicInformation/exploration-enterprise-manager/add/index')
    }
  ],
};
